package com.ops.service.ns.system.controller;

import java.util.logging.Logger;
import com.ops.service.ns.system.bo.OnlinePayrollSystemBO;
import com.ops.schema.ns.system.LoginRequest;
import com.ops.schema.ns.system.LoginResponse;
import com.ops.schema.ns.system.LogoutRequest;
import com.ops.schema.ns.system.LogoutResponse;
import com.ops.schema.ns.system.RetrieveMenuRequest;
import com.ops.schema.ns.system.RetrieveMenuResponse;
import com.ops.schema.ns.system.SearchParametersRequest;
import com.ops.schema.ns.system.SearchParametersResponse;
import com.ops.schema.ns.system.UpdateEmployerRequest;
import com.ops.schema.ns.system.UpdateEmployerResponse;
import com.ops.schema.ns.system.UpdateParametersRequest;
import com.ops.schema.ns.system.UpdateParametersResponse;
import com.ops.schema.ns.system.SearchParametersRequest;
import com.ops.schema.ns.system.SearchParametersResponse;
import com.ops.schema.ns.system.UpdateParametersRequest;
import com.ops.schema.ns.system.UpdateParametersResponse;
import com.ops.schema.ns.system.SearchMessagesRequest;
import com.ops.schema.ns.system.SearchMessagesResponse;
import com.ops.schema.ns.system.UpdateMessagesRequest;
import com.ops.schema.ns.system.UpdateMessagesResponse;
import com.ops.schema.ns.system.SearchLookUpsRequest;
import com.ops.schema.ns.system.SearchLookUpsResponse;
import com.ops.schema.ns.system.UpdateLookUpsRequest;
import com.ops.schema.ns.system.UpdateLookUpsResponse;
import com.ops.schema.ns.system.SearchRulesRequest;
import com.ops.schema.ns.system.SearchRulesResponse;
import com.ops.schema.ns.system.UpdateRulesRequest;
import com.ops.schema.ns.system.UpdateRulesResponse;
import com.ops.schema.ns.system.SearchRuleBindsRequest;
import com.ops.schema.ns.system.SearchRuleBindsResponse;
import com.ops.schema.ns.system.SearchRuleRatesRequest;
import com.ops.schema.ns.system.SearchRuleRatesResponse;
import com.ops.schema.ns.system.UpdateRuleRatesRequest;
import com.ops.schema.ns.system.UpdateRuleRatesResponse;
import com.ops.schema.ns.system.SearchUserSessionsRequest;
import com.ops.schema.ns.system.SearchUserSessionsResponse;
import com.ops.schema.ns.system.SearchUsersRequest;
import com.ops.schema.ns.system.SearchUsersResponse;
import com.ops.schema.ns.system.UpdateUsersRequest;
import com.ops.schema.ns.system.UpdateUsersResponse;
import com.ops.schema.ns.system.SearchUserActionsRequest;
import com.ops.schema.ns.system.SearchUserActionsResponse;
import com.ops.schema.ns.system.SearchTaxAuthoritiesRequest;
import com.ops.schema.ns.system.SearchTaxAuthoritiesResponse;
import com.ops.schema.ns.system.UpdateTaxAuthoritiesRequest;
import com.ops.schema.ns.system.UpdateTaxAuthoritiesResponse;
import com.ops.schema.ns.system.RetrieveRolesRequest;
import com.ops.schema.ns.system.RetrieveRolesResponse;

import com.ops.service.ns.system.exception.OPSException;

public class OPSController {
	 private static final Logger LOG_CONT = Logger.getLogger(OPSController.class.getName());
	 private OnlinePayrollSystemBO onlinePayrollSystemBO;
	 public OnlinePayrollSystemBO getOnlinePayrollSystemBO(){
		 return this.onlinePayrollSystemBO;
	 }
	 public void setOnlinePayrollSystemBO(OnlinePayrollSystemBO onlinePayrollSystemBO ){
		 this.onlinePayrollSystemBO=onlinePayrollSystemBO;
	 }
	 
	 public LoginResponse login(LoginRequest parameters) throws OPSException {
		LOG_CONT.info("Inside login method ");
		long inTime = System.currentTimeMillis();
		LoginResponse response = onlinePayrollSystemBO.login(parameters);
		long outTime = System.currentTimeMillis();
		LOG_CONT.info("Exit login method. Total time taken= "+(outTime - inTime));
		return response;
	 }
	
	 public LogoutResponse logout(LogoutRequest parameters) throws OPSException {
		LOG_CONT.info("Inside logout method ");
		long inTime = System.currentTimeMillis();
		LogoutResponse response = onlinePayrollSystemBO.logout(parameters);
		long outTime = System.currentTimeMillis();
		LOG_CONT.info("Exit logout method. Total time taken= "+(outTime - inTime));
		return response;
	 }	 
	 public RetrieveMenuResponse retrieveMenu(RetrieveMenuRequest parameters) throws OPSException {
		LOG_CONT.info("Inside retrieveMenu method ");
		long inTime = System.currentTimeMillis();
		RetrieveMenuResponse response = onlinePayrollSystemBO.retrieveMenu(parameters);
		long outTime = System.currentTimeMillis();
		LOG_CONT.info("Exit retrieveMenu method. Total time taken= "+(outTime - inTime));
		return response;
	 }	
	 
	 public UpdateEmployerResponse updateEmployer(UpdateEmployerRequest parameters) throws OPSException {
		LOG_CONT.info("Inside updateEmployer method ");
		long inTime = System.currentTimeMillis();
		UpdateEmployerResponse response = onlinePayrollSystemBO.updateEmployer(parameters);
		long outTime = System.currentTimeMillis();
		LOG_CONT.info("Exit updateEmployer method. Total time taken= "+(outTime - inTime));
		return response;
	 }	 

	 public SearchParametersResponse searchParameters(SearchParametersRequest parameters) throws OPSException {
		LOG_CONT.info("Inside searchParameters method ");
		long inTime = System.currentTimeMillis();
		SearchParametersResponse response = onlinePayrollSystemBO.searchParameters(parameters);
		long outTime = System.currentTimeMillis();
		LOG_CONT.info("Exit searchParameters method. Total time taken= "+(outTime - inTime));
		return response;
	 }	 

	 public UpdateParametersResponse updateParameters(UpdateParametersRequest parameters) throws OPSException {
		LOG_CONT.info("Inside updateParameters method ");
		long inTime = System.currentTimeMillis();
		UpdateParametersResponse response = onlinePayrollSystemBO.updateParameters(parameters);
		long outTime = System.currentTimeMillis();
		LOG_CONT.info("Exit updateParameters method. Total time taken= "+(outTime - inTime));
		return response;
	 }	
	 
	 public SearchMessagesResponse searchMessages(SearchMessagesRequest parameters) throws OPSException {
		LOG_CONT.info("Inside searchMessages method ");
		long inTime = System.currentTimeMillis();
		SearchMessagesResponse response = onlinePayrollSystemBO.searchMessages(parameters);
		long outTime = System.currentTimeMillis();
		LOG_CONT.info("Exit searchMessages method. Total time taken= "+(outTime - inTime));
		return response;
	 }	 

	 public UpdateMessagesResponse updateMessages(UpdateMessagesRequest parameters) throws OPSException {
		LOG_CONT.info("Inside updateParameters method ");
		long inTime = System.currentTimeMillis();
		UpdateMessagesResponse response = onlinePayrollSystemBO.updateMessages(parameters);
		long outTime = System.currentTimeMillis();
		LOG_CONT.info("Exit updateParameters method. Total time taken= "+(outTime - inTime));
		return response;
	 }

	 public SearchLookUpsResponse searchLookups(SearchLookUpsRequest parameters) throws OPSException {
		LOG_CONT.info("Inside searchLookup method ");
		long inTime = System.currentTimeMillis();
		SearchLookUpsResponse response = onlinePayrollSystemBO.searchLookups(parameters);
		long outTime = System.currentTimeMillis();
		LOG_CONT.info("Exit searchLookup method. Total time taken= "+(outTime - inTime));
		return response;
	 }	 

	 public UpdateLookUpsResponse updateLookups(UpdateLookUpsRequest parameters) throws OPSException {
		LOG_CONT.info("Inside updateLookup method ");
		long inTime = System.currentTimeMillis();
		UpdateLookUpsResponse response = onlinePayrollSystemBO.updateLookups(parameters);
		long outTime = System.currentTimeMillis();
		LOG_CONT.info("Exit updateLookup method. Total time taken= "+(outTime - inTime));
		return response;
	 }
	 
	 public SearchRulesResponse searchRules(SearchRulesRequest parameters) throws OPSException {
		LOG_CONT.info("Inside searchRules method ");
		long inTime = System.currentTimeMillis();
		SearchRulesResponse response = onlinePayrollSystemBO.searchRules(parameters);
		long outTime = System.currentTimeMillis();
		LOG_CONT.info("Exit searchRules method. Total time taken= "+(outTime - inTime));
		return response;
	 }	 

	 public UpdateRulesResponse updateRules(UpdateRulesRequest parameters) throws OPSException {
		LOG_CONT.info("Inside updateRules method ");
		long inTime = System.currentTimeMillis();
		UpdateRulesResponse response = onlinePayrollSystemBO.updateRules(parameters);
		long outTime = System.currentTimeMillis();
		LOG_CONT.info("Exit updateRules method. Total time taken= "+(outTime - inTime));
		return response;
	 }	 
	 
	 public SearchRuleBindsResponse searchRuleBinds(SearchRuleBindsRequest parameters) throws OPSException {
		LOG_CONT.info("Inside searchRuleBinds method ");
		long inTime = System.currentTimeMillis();
		SearchRuleBindsResponse response = onlinePayrollSystemBO.searchRuleBinds(parameters);
		long outTime = System.currentTimeMillis();
		LOG_CONT.info("Exit searchRuleBinds method. Total time taken= "+(outTime - inTime));
		return response;
	 }
	 
	 public SearchRuleRatesResponse searchRuleRates(SearchRuleRatesRequest parameters) throws OPSException {
		LOG_CONT.info("Inside searchRuleRates method ");
		long inTime = System.currentTimeMillis();
		SearchRuleRatesResponse response = onlinePayrollSystemBO.searchRuleRates(parameters);
		long outTime = System.currentTimeMillis();
		LOG_CONT.info("Exit searchRuleRates method. Total time taken= "+(outTime - inTime));
		return response;
	 }	 

	 public UpdateRuleRatesResponse updateRuleRates(UpdateRuleRatesRequest parameters) throws OPSException {
		LOG_CONT.info("Inside updateRuleRates method ");
		long inTime = System.currentTimeMillis();
		UpdateRuleRatesResponse response = onlinePayrollSystemBO.updateRuleRates(parameters);
		long outTime = System.currentTimeMillis();
		LOG_CONT.info("Exit updateRuleRates method. Total time taken= "+(outTime - inTime));
		return response;
	 }	 	 
	 
	 public SearchUserSessionsResponse searchUserSessions(SearchUserSessionsRequest parameters) throws OPSException {
		LOG_CONT.info("Inside searchUserSessions method ");
		long inTime = System.currentTimeMillis();
		SearchUserSessionsResponse response = onlinePayrollSystemBO.searchUserSessions(parameters);
		long outTime = System.currentTimeMillis();
		LOG_CONT.info("Exit searchUserSessions method. Total time taken= "+(outTime - inTime));
		return response;
	 }
	 
	 public SearchUsersResponse searchUsers(SearchUsersRequest parameters) throws OPSException {
		LOG_CONT.info("Inside searchUsers method ");
		long inTime = System.currentTimeMillis();
		SearchUsersResponse response = onlinePayrollSystemBO.searchUsers(parameters);
		long outTime = System.currentTimeMillis();
		LOG_CONT.info("Exit searchUsers method. Total time taken= "+(outTime - inTime));
		return response;
	 }
	 
	 public UpdateUsersResponse updateUsers(UpdateUsersRequest parameters) throws OPSException {
		LOG_CONT.info("Inside updateUsers method ");
		long inTime = System.currentTimeMillis();
		UpdateUsersResponse response = onlinePayrollSystemBO.updateUsers(parameters);
		long outTime = System.currentTimeMillis();
		LOG_CONT.info("Exit updateUsers method. Total time taken= "+(outTime - inTime));
		return response;
	 }	 
	 
	 public SearchUserActionsResponse searchUserActions(SearchUserActionsRequest parameters) throws OPSException {
		LOG_CONT.info("Inside searchUserActions method ");
		long inTime = System.currentTimeMillis();
		SearchUserActionsResponse response = onlinePayrollSystemBO.searchUserActions(parameters);
		long outTime = System.currentTimeMillis();
		LOG_CONT.info("Exit searchUserActions method. Total time taken= "+(outTime - inTime));
		return response;
	 }

	 public SearchTaxAuthoritiesResponse searchTaxAuthorities(SearchTaxAuthoritiesRequest parameters) throws OPSException {
		LOG_CONT.info("Inside searchTaxAuthorities method ");
		long inTime = System.currentTimeMillis();
		SearchTaxAuthoritiesResponse response = onlinePayrollSystemBO.searchTaxAuthorities(parameters);
		long outTime = System.currentTimeMillis();
		LOG_CONT.info("Exit searchTaxAuthorities method. Total time taken= "+(outTime - inTime));
		return response;
	 }

	 public UpdateTaxAuthoritiesResponse updateTaxAuthorities(UpdateTaxAuthoritiesRequest parameters) throws OPSException {
		LOG_CONT.info("Inside updateTaxAuthorities method ");
		long inTime = System.currentTimeMillis();
		UpdateTaxAuthoritiesResponse response = onlinePayrollSystemBO.updateTaxAuthorities(parameters);
		long outTime = System.currentTimeMillis();
		LOG_CONT.info("Exit updateTaxAuthorities method. Total time taken= "+(outTime - inTime));
		return response;
	 }	 

	 public RetrieveRolesResponse retrieveRoles(RetrieveRolesRequest parameters) throws OPSException {
		LOG_CONT.info("Inside retrieveRoles method ");
		long inTime = System.currentTimeMillis();
		RetrieveRolesResponse response = onlinePayrollSystemBO.retrieveRoles(parameters);
		long outTime = System.currentTimeMillis();
		LOG_CONT.info("Exit retrieveRoles method. Total time taken= "+(outTime - inTime));
		return response;
	 }
}
